var pingThis = {};

pingThis = {
	img:null, 
	timer:null,
	smapUp:null, 
	init:function(uri) {
		var session = new Date();
		var dontCache = session.getTime();
		var imgLink = uri+"?time="+dontCache;//prevent JavaScript from using cached image
		pingThis.img = new Image();
		pingThis.img.onload = function() {
			clearTimeout(pingThis.timer);
			pingThis.timer = null;
			pingThis.smapUp = true;
		};
		pingThis.img.src = imgLink;
		pingThis.timer = setTimeout("pingThis.pingFailure()",5000);//wait 5 seconds
	},
	pingFailure:function() {
		clearTimeout(pingThis.timer);
		pingThis.timer = null;
		pingThis.img = null;
		pingThis.smapUp = false;
		alert("Domain is not available");
	}
};